#include <bits/stdc++.h>
using namespace std;

int main(){
    int n, P1, P2, P3, T1, T2, a, b, stop = 0;
    int p1time = 0, p2time = 0, p3time = 0;
    cin >> n >> P1 >> P2 >> P3 >> T1 >> T2;
    for(int i = 0; i < n; i++){
        cin >> a >> b;
        p1time += (b - a);
        if(stop == 0) {
            stop = b;
            continue;
        }
        int gap = a - stop;
        stop = b;
        p1time += (gap > T1 ? T1 : gap);
        gap -= T1; if(gap <= 0) continue;
        p2time += (gap > T2 ? T2 : gap);
        gap -= T2; if(gap <= 0) continue;
        p3time += gap;
    }
    cout << p1time * P1 + p2time * P2 + p3time * P3;
}